package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.ISystemSettingActivityModel;
import com.wgts.wgts.mvp.model.imp.SystemSettingActivityModel;
import com.wgts.wgts.mvp.presenter.ISystemSettingActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.SystemSettingActivityPresenter;
import com.wgts.wgts.mvp.view.ISystemSettingActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.SharedpreferencesHelper;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/610:19
 *
 */
@Module
public class SystemSettingActivityModule {
    private ISystemSettingActivityView view;

    public SystemSettingActivityModule(ISystemSettingActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public ISystemSettingActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public ISystemSettingActivityModel provideModel(NetService netService, SharedpreferencesHelper sharedpreferencesHelper){
        return new SystemSettingActivityModel(netService, sharedpreferencesHelper);
    }

    @ActivityScope
    @Provides
    public ISystemSettingActivityPresenter providePresenter(ISystemSettingActivityView view, ISystemSettingActivityModel model){
        return new SystemSettingActivityPresenter(view, model);
    }
}
